Fix tailor validation rejecting company in subtitle field#71
Open
ArchieChelle wants to merge 2 commits into
Open
Fix tailor validation rejecting company in subtitle field#71ArchieChelle wants to merge 2 commits into
ArchieChelle wants to merge 2 commits into
Conversation
The preserved-company check in validate_json_fields only looked at each experience entry's `header` field. The LLM reliably places the role in `header` and the company in `subtitle` (e.g. "First Family Trust | Dates"), so the check failed for every company on nearly every job, causing ~95% of tailored resumes to be rejected as FAILED_VALIDATION after exhausting all retries. Check the company name against both `header` and `subtitle` so legitimately formatted output passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The resume tailor's Layer 1 validator (
validate_json_fieldsinscoring/validator.py) was rejecting valid tailored resumes withCompany 'X' missing from experience, even when the company was present.Root cause: the preserved-company check only inspected each experience entry's
headerfield. But the tailor prompt's JSON schema lets the LLM place the company in either theheader("Title at Company") or thesubtitle("Company | Dates"). When the LLM chose the subtitle, the check failed and the whole resume was rejected as a fabrication/omission.Observed impact: 19 of 20 tailored resumes in a run failed validation for this reason.
Fix
Check the company name against both
headerandsubtitlewhen verifying preserved companies are present. After the fix, 16–19 of 20 pass.Scope
One-line logic change in
validator.py. No schema or prompt changes.